import java.awt.*;
import javax.swing.*;

public class StoreGUI extends JFrame{
	//	Local variables	
	private JPanel _centerP;
	private FloorPanel _somethingP;
	private ButtonPanel _buttonP;
	private QueuePanel _queueP;
	private StoreLogic _logic;
	
	public StoreGUI()
	{
		super("Store");
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		_logic = new StoreLogic();
		_somethingP = new FloorPanel(_logic, this);
		_queueP = new QueuePanel(_logic);
		_buttonP = new ButtonPanel(this, _queueP,_somethingP,_logic);
		_centerP = new JPanel(new GridLayout(2,1));
		
		setLayout();
		
		this.setSize(500, 500);
		this.setVisible(true);
	}
	
	public void setLayout()
	{
		this.setLayout(new BorderLayout());
		this.setResizable(false);
		this.add(_centerP,BorderLayout.CENTER);
		this.add(_buttonP,BorderLayout.EAST);
		_centerP.add(_somethingP);
		_centerP.add(_queueP);
	}
	
	public static void main(String[] args) {
		new StoreGUI();
	}
}
